package judesart.app.client;

import judesart.app.client.layout.MainLayout;

import com.allen_sauer.gwt.log.client.Log;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.ui.RootPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class AdminApp implements EntryPoint
{
    private Viewport viewport;

    /**
     */
    public void onModuleLoad()
    {
        Log.setUncaughtExceptionHandler();

        DeferredCommand.addCommand(new Command()
        {
            @Override
            public void execute()
            {
                onModuleLoad2();
            }
        });
    }

    /**
     * This is the entry point method.
     * 
     * @wbp.parser.entryPoint
     */
    public void onModuleLoad2()
    {
        MainLayout mainPanel = MainLayout.getInstance();
        mainPanel.setStyleAttribute("background-color", "#fff");
        mainPanel.setStyleAttribute("margin", "0 auto");
        mainPanel.setStyleAttribute("overflow", "auto");
        mainPanel.setWidth(960);
        mainPanel.setHeight(700);

        RootPanel.get().add(mainPanel);
        mainPanel.layout();
    }
}
